
#include <cassert>
#include <iostream>
#include <memory>
#include <vector>
using namespace std;

int main() {

  shared_ptr<std::vector<int>> vec_ptr, vptr;
  vptr = make_shared<vector<int>>();
  shared_ptr<int[]> arr_ptr;
  arr_ptr.reset(new int[10]);
  vec_ptr.reset(new vector<int>);
  for (int i = 0; i < 10; ++i) {
    vec_ptr->push_back(i);
    vptr->push_back(i);
    arr_ptr[i] = i;
  }
  cout << vec_ptr->size() << endl;
  for (int i = 0; i < vec_ptr->size(); ++i) {
    cout << (*vec_ptr)[i] << endl;
    cout << (*vptr)[i] << endl;
    cout << arr_ptr[i] << endl;
    // cout << vec_ptr.get()[i] <<
  }
  return 0;
}